Feature: Create Account Page - Get Producer Info

  @happy @test
  Scenario: Get Producer Info with vaild carrier id and alliance id
    When I send a GET request to "user/alliance-agent/Gro21010/9811"
    Then the response status should be 200
    And the agent number returned is correct
    And the agentSelectString returned is correct

  @happy  @test
  Scenario: Get Producer Info with vaild carrier id and alliance id
    When I send a GET request to "user/alliance-agent/Lif25311/9865"
    Then the response status should be 200
    And the agent number returned is correct
    And the agentSelectString returned is correct

  @happy @test
  Scenario: Get Producer Info with vaild carrier id and alliance id
    When I send a GET request to "user/alliance-agent/Pac26719/97102600"
    Then the response status should be 200
    And the agent number returned is correct
    And the agentSelectString returned is correct

  @happy @test
  Scenario: Get Producer Info with vaild carrier id and alliance id
    When I send a GET request to "user/alliance-agent/Pac26719/97125100"
    Then the response status should be 200
    And the agent number returned is correct
    And the agentSelectString returned is correct

  @sad @test
  Scenario Outline: Alliance Id and Carrier Id Validation
    When I send a GET request to "user/alliance-agent/<allianceId>/<carrierId>"
    Then the response status should be 400
    And the error message should be "<message>"

    Examples: 
      | allianceId | carrierId | message                  |
      | jet90000 | 9811    | AllianceId is invalid. |
      | Gro21010 | 9811s   | CarrierId is invalid.  |

  @sad @test
  Scenario: Alliance Id and Carrier Id does not match - System return null producer info
    When I send a GET request to "user/alliance-agent/Pac26719/9811"
    Then the response status should be 200
    And the JSON response should be
      """
      {
      "showAgentSelectionBlock": false,
      "msShowAgentSelectionBlock": true,
      "agentSelectionRequired": false,
      "allianceAgents": []
      }
      """
      
      @sad @test
  Scenario: Resource not found - System return error message
    When I send a GET request to "user/alliance-agent/Pac26719/"
    Then the response status should be 404
    And the error message should be "Resource doesn't exist"
